﻿//Mr Inventory by David Mauler 10.2.2010
//Mr Inventory is release underd the 
//GNU General Public License version 2 (GPLv2)


using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;

public partial class addserv : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    public void onClick_bSubmit(object sender, EventArgs e)
    {
        if (!(tbName.Text == ""))
        {
            ServerInv server = new ServerInv(tbName.Text, tbOs.Text, tbSoft.Text, tbVm.Text, 
                                             tbIp.Text, tbModel.Text, tbSerNumb.Text, tbCpu.Text, 
                                             tbMem.Text, tbStorage.Text, tbLoc.Text, tbNotes.Text);
            
            ServerSql sqlAdd = new ServerSql();
            lbMessage.Text = "<p class='evenLine'>" + sqlAdd.addServr(server) + "</p>";
        }
        else
        {
            lbMessage.Text = "<p class='evenLine'>Error you must supply a server name!</p>";
        }
        
    }
}
